<template>
  <section>
    <el-form label-width="100px">
      <el-form-item label="logo">
        图片上传
      </el-form-item>
      <el-form-item label="名称">
        <el-input v-model="teamForm.name" placeholder="请输入公司名称" size="mini" style="width:200px" />
      </el-form-item>
      <el-form-item label="联系人">
        <el-input v-model="teamForm.contact" placeholder="请输入联系人" size="mini" style="width:200px" />
      </el-form-item>
      <el-form-item label="联系方式">
        <el-input v-model="teamForm.phone" placeholder="请输入联系方式" size="mini" style="width:200px" />
      </el-form-item>
      <el-form-item label="公司地址">
        <el-input v-model="teamForm.address" placeholder="请输入地址" size="mini" style="width:300px" />
      </el-form-item>
      <el-form-item label="其他">
        <el-input v-model="teamForm.data.ps" type="textarea" size="mini" style="width:300px" />
      </el-form-item>
      <el-form-item  >
        <el-button type="success" @click="confirmBtn(teamForm)" size="mini">提交</el-button>
      </el-form-item>
    </el-form>
  </section>
</template>

<script>
import { createNamespacedHelpers } from 'vuex'
const { mapState, mapActions } = createNamespacedHelpers(
  process.env.VUE_APP_MODULE_TITLE
)
export default {
  name: 'editTeam',
  props: ['teamForm'],
  data() {
    return {}
  },
  computed: {},
  created() {
    console.log('什么情况----------', this.modeTeamList)
  },
  methods: {
    confirmBtn(teamForm) {
      console.log('确认提交--------------', teamForm)
      if(teamForm.id){
        this.updateTeam(teamForm)
      }else{
        this.createdTeam(teamForm)
      }
    },
    createdTeam(data){
      console.log('创建team')
    },
    updateTeam(data){
      console.log('更新team')
    },
  }
}
</script>

<style scoped>
/* .el-form-item{
    display: flex
} */
</style>
